package com.eastfair.common.api;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.pay.dto.InvoiceApplyerDTO;
import com.eastfair.pay.dto.InvoiceApplyerPageQuery;
import com.eastfair.pay.vo.InvoiceApplyerVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * <p>
 * 前端控制器
 * 发票申请
 * </p>
 *
 * @author clm
 * @date 2022-06-08
 */
@FeignClient(value = "mice-pay/invoiceApplyer")
public interface InvoiceApplyerFeign {

    @PostMapping("/save")
    R saveInvoiceApplyer(@RequestBody @Validated InvoiceApplyerDTO invoiceApplyerDTO);


    @GetMapping("/invoice/{applyId}")
    R invoice(@PathVariable("applyId") Long applyId);

    @PostMapping("/queryList")
    R<Page<InvoiceApplyerVO>> queryList(@RequestBody @Validated PageParams<InvoiceApplyerPageQuery> params);

    @PostMapping("/queryExamineState/buinessIds")
    R<List<InvoiceApplyerVO>> queryInvoiceExamineState(@RequestBody List<Long> buinessIds);

}
